<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>结算</title>
	<link rel="stylesheet" href="css/jd_balancecss.css" />
	<link rel="stylesheet" href="css/jd_balance.css" />
	<link rel="stylesheet" href="font/css/font-awesome.min.css" />
	<script type="text/javascript" src="jquery/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="js/jd_topad.js" ></script>
	<script type="text/javascript" src="js/jd_shopcar.js" ></script>
</head>
<body>

	<!-- 左边导航条 -->
	<!-- 顶部导航区域开始  -->
		<div id="topad">
		<div class="center" style="margin-right: 5100px;">

			<ul style="float:right;width:auto;">
				<?php if (isset($_SESSION['user_id'])): ?>
					<li class="a"><a class="hello" href="<?php echo U('Member/User/myInfo') ?>"><?php echo $_SESSION['username'] ?></a><a class="login" href="<?php echo U('Member/User/quit') ?>">退出</a><span class="line"></span></li>
				<?php else: ?>
					<li class="a"><a class="hello" href="<?php echo U('Member/User/login') ?>">你好，请登录</a><a class="login" href="<?php echo U('Member/User/register') ?>">免费注册</a><span class="line"></span></li>
				<?php endif ?>

				<li><a href="<?php echo U('Member/Index/order') ?>">我的订单</a><span class="line"></span></li>
				<li class="a side"><a href="<?php echo U('Member/Index/myInfo') ?>">我的京东</a>

				</li>

			</ul>
		</div>
	</div>
	<!-- 顶部导航区域结束 -->

	<!-- 搜索区域开始-->
	<div id="search">
		<img src="images/logo-201305.jpg" height="60" width="270" alt="" class="jd" />
		<!-- <img src="image/phone/purchase-icon.png" height="70" width="100" alt="" class="jdlogo" /> -->
		<div class="progress">
			<div class="progress1">
				<i></i>
				<span class="progress_num">1</span>
				<p class="progress_shopcar">1.我的购物车</p>
			</div>
			<div class="progress2">
				<i></i>
				<span class="progress_num">2</span>
				<p class="progress_shopcar">2.填写核对订单信息</p>
			</div>
			<div class="progress3">
				<i></i>
				<span class="progress_num">3</span>
				<p class="progress_shopcar">3.成功提交订单</p>
			</div>
		</div>
	</div>
	<!-- 搜索区域结束-->
	<!-- 主区域开始 -->
	<div id="item_content">
		<div class="center">
			<h1 class="news">
				填写并核对订单信息
			</h1>
			<div class="content">
				<div class="content_address">
					<h1 class="consignee_news">
						收货人信息
					</h1>
					<ul class="consignee_address">
						<li>
							<a class="box">
								默认地址
							</a>
							<p class="place">
								<input type="hidden" name="address_id" value="<?php echo $address['address_id'] ?>">
								<span class="name"><?php echo $address['consignee'] ?></span>
								<span class="place_news"><?php echo $address['province'] ?>  <?php echo $address['city'] ?> <?php echo $address['county'] ?> <?php echo $address['detailaddress'] ?></span>
								<span class="phone"><?php echo $address['phonenumber'] ?></span>
								<a href="" class="edit">编辑</a>
								<a href="" class="del">删除</a>
							</p>
						</li>
						<li class="moreaddress">
							<!-- <a href="" title="">
								更多地址
								<i class="icon-double-angle-down"></i>
							</a> -->
						</li>
					</ul>
				</div>
				<div class="pay_way">
					<h1 class="consignee_news">
						支付方式
					</h1>
					<ul class="consignee_address">
						<li>
							<a class="box confirm" id="box" value='1'>
								货到付款
							</a>
							<a class="box">
								在线支付
							</a>
						</li>
					</ul>
				</div>
				<div class="send_list">
					<h1 class="consignee_news">
						送货清单
						<a href="<?php echo U('Home/Index/goShopCart') ?>" class="edit_car">
							返回修改购物车
						</a>
					</h1>
					<script type="text/javascript">
						$(function(){
							$('.pay_way ul li a').click(function(){
								$(this).addClass('confirm').siblings('a').removeClass('confirm');
							})

							$('.sing').each(function(i){
								var price = $('.sing').eq(i).parents('.item_show').find('.singleprice').val()*1;
								var num = $('.sing').eq(i).parents('.item_show').find('.num').html()*1;

								$('.sing').eq(i).html(price*num);
							})
						})

					</script>
					<?php foreach ($goods as $k => $v): ?>
						<div class="item_show">
							<h2>
								商家：京东自营
							</h2>
							<ul class="item_ul">
								<li class="img">
									<a href="" title="">
										<img src="<?php echo $v['pic'] ?>">
									</a>
								</li>
								<li class="item_name">
									<p class="title_item">
										<?php echo $v['good']['goods_name'] ?>
									</p>
									<p class="gift">
										<span class="icon-gift"></span>
										<a href="" title="">7天无理由退货</a>
									</p>
								</li>
								<li class="price">
									<p class="price_num num"><?php echo $v['buynum'] ?></p>
								</li>
								<li class="price ">
									<input type="hidden" name="" class="singleprice" value="<?php echo $v['prices'] ?>">
									<p class="price_num sing"></p>
								</li>
								<li class="action">
									<p class="focus">
										<a href="" class="move">有货</a>
									</p>
								</li>
								<li class="donation">

								</li>
							</ul>

						</div>
					<?php endforeach ?>

				</div>
				<div class="invoice">
					<h1 class="consignee_news">
						发票信息
					</h1>
					<ul class="consignee_address">
						<li>
							<p class="place">
								<script type="text/javascript">
									$(function(){
										$('#fapiao').click(function() {

											$('#fapiao').prop('checked',function(i,val)
											{
												$("#fapiao").prop('checked',val);
												if (!val) {
													$('#fapiao').siblings('.place_news,input.text').hide()
												}else{
													$('#fapiao').siblings('.place_news,input.text').show()
												}

											});

										});
									})


								</script>
								<input type="checkbox" name="" id="fapiao" style="vertical-align: middle">
								<span class="name">是否开发票</span>
								<span class="place_news" style='display: none'>发票抬头:</span>
								<input type="text"  class="text" style="vertical-align:middle;border:1px solid #333;display: none">
								<a href="" class="edit">修改</a>
							</p>
						</li>
					</ul>
				</div>
			</div>
			<div class="confirm">
				<table class="confirm_news">
					<tr>
						<td>总商品金额：</td>
						<td>￥<span class='t_price'></span></td>
					</tr>
					<tr>
						<td>运费：</td>
						<td>￥0.00</td>
					</tr>
					<tr>
						<td>应付总额：</td>
						<td>￥<span class='t_price'></span></td>
					</tr>
				</table>
			</div>
			<div class="confirm_pay">
				<table class="confirm_news">
					<tr>
						<td> 应付总额：<span style='color:#E03335;font-size:16px;font-weight: bold;font-size: 18px;'>￥<span class='t_price' style='color:#E03335;font-size:16px;font-weight: bold;font-size: 18px;'></span></span></td>
						<td><a href="javascript:order()" title="">提交订单</a></td>
					</tr>

				</table>
				<script type="text/javascript">
					$(function(){
						var totalpr = 0;
						$('.sing').each(function(i){
							totalpr += $('.sing').html()*1;
						})
						$('.t_price').html(totalpr);


					})
					function order()
					{
						var address = $('[name=address_id').val();
						location.href='index.php?m=Member&c=Index&a=balancesuccess&address_id='+address;

					}
				</script>
			</div>
			<div class="send_address">
				<p class="address">寄送至：<?php echo $address['province'] ?>  <?php echo $address['city'] ?> <?php echo $address['county'] ?> <?php echo $address['detailaddress'] ?></p>
				<p class="mobile">收货人：<?php echo $address['consignee'] ?> <?php echo $address['phonenumber'] ?></p>
			</div>
		</div>
	</div>

	<!-- 主区域结束 -->
	<!-- <div style="height:1000px;"></div> -->
	<!-- 底部服务开始 -->
	<div id="service" style="border-top:1px solid #dcdcdc;padding-top:10px;">
		<div class="part">
			<h3>购物指南</h3>
			<a href="">购物流程</a>
			<a href="">会员介绍</a>
			<a href="">生活旅行/团购</a>
			<a href="">常见问题</a>
			<a href="">大家电</a>
			<a href="">联系客服</a>
		</div>
		<div class="part2">
			<h3>配送方式</h3>
			<a href="">上门自提</a>
			<a href="">211限时达</a>
			<a href="">配送服务查询</a>
			<a href="">配送费收取标准</a>
			<a href="">海外配送</a>
		</div>
		<div class="part">
			<h3>支付方式</h3>
			<a href="">货到付款</a>
			<a href="">在线支付</a>
			<a href="">分期付款</a>
			<a href="">邮局汇款</a>
			<a href="">公司转账</a>
		</div>
		<div class="part">
			<h3>售后服务</h3>
			<a href="">售后政策</a>
			<a href="">价格保护</a>
			<a href="">退款说明</a>
			<a href="">返修/退换货</a>
			<a href="">取消订单</a>
		</div>
		<div class="part5">
			<h3>特色服务</h3>
			<a href="">夺宝岛</a>
			<a href="">DIY装机</a>
			<a href="">延保服务</a>
			<a href="">京东E卡</a>
			<a href="">京东通信</a>
		</div>
		<div class="part6">
			<h3>京东自营覆盖区县</h3>
			<p>京东已向全国1978个区县提供自营配送服务，支持货到付款、OS机刷卡和售后上门服务。</p>
			<a href="">查看详情 ></a>
		</div>
	</div>
	<!-- 底部服务结束 -->
	<!-- 底部索引开始 -->
	<div id="index">
		<p class="first">
			<a href="">关于我们</a>|
			<a href="">联系我们</a>|
			<a href="">商家入驻</a>|
			<a href="">营销中心</a>|
			<a href="">手机京东</a>|
			<a href="">友情链接</a>|
			<a href="">销售联盟</a>|
			<a href="">京东社区</a>|
			<a href="">京东公益</a>|
			<a href="">English Site</a>|
			<a href="">Contact Us</a>
		</p>
		<p class="second">
			<span>北京市公安局朝阳分局备案编号110105014669</span>|
			<span>京ICP证070359号</span>|
			<a href="">互联网药品信息服务资格证编号(京)-经营性-2014-0008</a>|
			<span>新出发京零 字第大120007号</span>
		</p>
		<p class="third">
			<a href="">音像制品经营许可证苏宿批005号</a>|
			<span>出版物经营许可证编号新出发(苏)批字第N-012号</span>|
			<span>互联网出版许可证编号新出网证(京)字150号</span>
		</p>
		<p class="fourth">
			<a href="">网络文化经营许可证京网文[2014]2148-348号  </a>
			<span>违法和不良信息举报电话：4006561155  Copyright © 2004-2015  京东JD.com 版权所有</span>
		</p>
		<p class="fifth">
			<span>京东旗下网站:</span>
			<a href="">360TOP</a>
			<a href="">拍拍网</a>
			<a href="">网银在线</a>
		</p>
		<div class="img">
			<img src="images/v.png" height="32" width="103" alt="" />
			<img src="images/v1.png" height="32" width="103" alt="" />
			<img src="images/v3.png" height="32" width="103" alt="" />
			<img src="images/v4.png" height="32" width="103" alt="" />
			<img src="images/v7.png" height="32" width="185" alt="" />
			<img src="images/v5.jpg" height="32" width="103" alt="" />
		</div>
	</div>
	<!-- 底部索引结束 -->
</body>
</html>